package com.huawei.esdk.tp.cxf.enumgen;

public abstract class DialModeMapping {

    public final static int DIAL_IN = 1;
    public final static int DIAL_OUT = 0;
    public final static int MIN = 0;
    public final static int MAX = 1;
    
	public static Integer enum2Int(DialMode videoFormat) {
	    if (null == videoFormat)
        {
            return null;
        }
		switch (videoFormat) {
		case DIAL_OUT: {
			return DIAL_OUT;
		}
		case DIAL_IN: {
			return DIAL_IN;
		}
		default: {
			return null;
		}
		}
	}
	/**
	 * 此处需要加一个默认值
	 * 用户输入错误时，返回错误码
	 * 用于预约会议的时候
	 * @param num
	 * @return
	 */
	public static DialMode int2Enum(Integer num) {
		if(null==num){
			return null;
		}
		switch (num) {
		case DIAL_OUT: {
			return DialMode.DIAL_OUT;
		}
		case DIAL_IN: {
			return DialMode.DIAL_IN;
		}
		default: {
			return null;
		}
		}
	}

}
